/*
 * Copyright (c) 2024 Black Sesame Technologies
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _DAL_BASE_TYPE_
#define _DAL_BASE_TYPE_

#include <stdint.h>
#include <stddef.h>

#include "sequence_base.h"

#ifdef __cplusplus
extern "C" {
#endif

typedef struct dal_duration_s
{
    long sec;
    unsigned long nanosec;
} dal_duration_t;

typedef struct dal_time_s
{
    long sec;
    unsigned long nanosec;
} dal_time_t;

typedef uint8_t octet;
typedef uint8_t BOOLEAN;

#define DAL_TRUE (uint8_t)(1)
#define DAL_FALSE (uint8_t)(0)

#define DOMAINID_TYPE_NATIVE long
typedef DOMAINID_TYPE_NATIVE dal_domain_id;

// TODO:
#define UNDEFINED_TYPE_NATIVE long

typedef UNDEFINED_TYPE_NATIVE ParticipantBuiltinTopicData;
typedef UNDEFINED_TYPE_NATIVE TopicBuiltinTopicData;
typedef SEQUENCE(dal_instance_handle_t) InstanceHandleSeq;
typedef UNDEFINED_TYPE_NATIVE SubscriptionBuiltinTopicData;
typedef UNDEFINED_TYPE_NATIVE PublicationBuiltinTopicData;

typedef UNDEFINED_TYPE_NATIVE dal_content_filtered_topic;
typedef UNDEFINED_TYPE_NATIVE dal_multi_topic;

typedef void* dal_data;
typedef SEQUENCE(dal_data) DataSeq;
typedef SEQUENCE(DataReader) DataReaderSeq;
typedef UNDEFINED_TYPE_NATIVE dal_status_condition;

typedef UNDEFINED_TYPE_NATIVE dal_readcondition;
typedef UNDEFINED_TYPE_NATIVE dal_querycondition;
typedef SEQUENCE(dal_sample_info_t) dal_sample_info_seq_t;

#ifdef __cplusplus
}
#endif

#endif  // _DAL_BASE_TYPE_